﻿using Core.AbstractEntities;

namespace Operations.Entities
{
    /// <summary>
    /// Execute operation for each item added in the stack
    /// </summary>
    public class OperationPrimitive : Operation
    {
        /// <summary>
        /// Constructor by default
        /// </summary>
        public OperationPrimitive(HpCollection hpCollection)
        {
            this.HpCollection = hpCollection;
        }
        /// <summary>
        /// Execution of the operation
        /// </summary>
        /// <returns>A HpElement with the result</returns>
        public override HpElement Execute()
        {
            return this.HpCollection.Get();
        }
    }
}
